//
// Created by nicemoe on 2021/8/30.
//

#include  <iostream>
#include "workermi.h"

using namespace std;

Worker::~Worker() {}

void Worker::Data() const {
    cout << "Name: " << fullname << endl;
    cout << "Employee ID： " << id << endl;
}

void Worker::Get() {
    getline(cin, fullname);
    cout << "Enter waiter's ID: ";
    cin >> id;
    while (cin.get() != '\n')continue;
}

void Waiter::Set() {
    cout << "Enter waiter's name: ";
    Worker::Get();
    Get();
}

void Waiter::Show() const {
    cout << "Category: waiter\n";
    Worker::Data();
    Data();
}
void Waiter::Data() const {
    cout << "Panache rating: " << panache << "\n";
}
void Waiter::Get() {
    cout <<"Enter waither's panache rating: ";
    cin >> panache;
    while (cin.get() != '\n')continue;
}
char *Singer::pv[] = {
        (char *) "other", (char *) "alto", (char *) "contralto", (char *) "soprano", (char *) "base",
        (char *) "baritone", (char *) "tenor"
};

void Singer::Set() {
    cout <<"Enter singer's name: ";
    Worker::Get();
    Get();
}
void Singer::Show() const {
    cout << "Category: singer\n";
    Worker::Data();
    Data();
}
void Singer::Data() const {
    cout << "Vocal ranger : " << pv[voice] << endl;
}
void Singer::Get() {
    cout << "Enter number for singer's vocal range:\n";
    int i;
    for (i = 0; i < Vtypes; i++) {
        cout << i << " : " << pv[i] << " ";
        if (i % 4 == 3) cout << endl;
    }
    if (i % 4 != 0) cout << endl;;
   cin >> voice;
    while (cin.get()!= '\n') continue;
}

void SingingWaiter::Data() const {
    Singer::Data();
    Waiter::Data();
}

void SingingWaiter::Get() {
    Waiter::Get();
    Singer::Get();
}
void SingingWaiter::Set() {
    cout<<"Enter singing waither's name: ";
    Worker::Get();
    Get();
}

void SingingWaiter::Show() const {
    cout <<"Category: singing waither\n";
    Worker::Data();
    Data();
}

